Skip to content

Restore grouped project filtering in Sidebar V2#4282

Merged
juliusmarminge merged 5 commits into
pingdotgg:mainfrom
shivamhwp:agent/group-sidebar-v2-projects
Jul 23, 2026
Merged

Restore grouped project filtering in Sidebar V2#4282
juliusmarminge merged 5 commits into
pingdotgg:mainfrom
shivamhwp:agent/group-sidebar-v2-projects

Conversation

@shivamhwp

@shivamhwp shivamhwp commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Why

Sidebar V2 treats environment-scoped copies of the same repository as separate projects. Users therefore see duplicate project entries and selecting one copy hides threads belonging to the other environment.

Root cause

Sidebar V2 filters directly by one physical environment/project pair instead of using the logical-project grouping already available to the legacy sidebar.

Fix

  • build logical project snapshots for Sidebar V2
  • filter active and settled threads by every physical member of the selected logical project
  • retain stale duplicate project references when resolving groups
  • preserve the configured project order for grouped snapshots

This PR is intentionally limited to Sidebar V2 filtering. New-thread pickers, settings, and mobile behavior are split into follow-up PRs.

Verification

  • vp lint on the five changed web files
  • vp run --filter @t3tools/web typecheck
  • vp test run apps/web/src/components/Sidebar.logic.test.ts apps/web/src/environmentGrouping.test.ts — 85 tests passed

Note

Medium Risk
Changes sidebar scoping and bulk project deletion across environments; behavior is localized to Sidebar V2 with new unit tests but affects navigation and destructive actions.

Overview
Sidebar V2 no longer treats each environment-scoped project as its own filter row. It builds logical project snapshots, sorts them with sortLogicalProjectsForSidebar (manual order vs recent activity across all member refs, ignoring archived threads), and scopes active/settled threads to every memberProjectRef in the selected group.

Grouping data changes: buildSidebarProjectSnapshots fills memberProjectRefs from the full project list (including stale duplicate physical entries routed to a logical group), not only display members. buildSidebarProjectPickerEntries is added for one entry per logical group with preferred-environment targeting (covered by tests; wired for follow-ups per PR scope).

The project filter menu, empty states, and remove project flow operate on groups—confirmation copy reflects multiple entries, and removal deletes all member projects and clears drafts. New thread treats a single logical group like a single project (projectGroups.length). Manual projectOrder is applied when building snapshots in manual sort mode.

Reviewed by Cursor Bugbot for commit ee44f63. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Restore grouped project filtering in Sidebar V2 to operate on logical project groups

  • Refactors SidebarV2.tsx to display, scope, and sort logical project groups (potentially spanning multiple environments) instead of individual projects.
  • Adds sortLogicalProjectsForSidebar in Sidebar.logic.ts to sort groups by recent activity across member threads, or respect manual order when configured.
  • Adds buildSidebarProjectPickerEntries in sidebarProjectGrouping.ts to produce picker entries per logical group, with preferred-environment targeting.
  • Project removal now deletes all member projects within a logical group and their threads, with a confirmation dialog that reflects grouped removal.
  • Behavioral Change: project scoping, empty states, and new-thread fast path now operate on group counts rather than individual project counts.

Macroscope summarized ee44f63.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1c36d43a-467d-495d-bd36-bc152c7e45b7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 22, 2026
Comment thread apps/web/src/components/SidebarV2.tsx
@shivamhwp
shivamhwp marked this pull request as ready for review July 22, 2026 14:40
Comment thread apps/web/src/components/SidebarV2.tsx Outdated
Comment thread apps/web/src/components/SidebarV2.tsx
@macroscopeapp

macroscopeapp Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR restores grouped project filtering functionality, significantly changing how projects are displayed, scoped, filtered, and deleted in the sidebar. The behavioral changes across multiple core operations warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Jul 22, 2026
Comment thread apps/web/src/components/SidebarV2.tsx Outdated
Comment thread apps/mobile/src/features/home/HomeScreen.tsx Outdated
Comment thread apps/mobile/src/features/home/HomeScreen.tsx Outdated
Comment thread apps/web/src/components/SidebarV2.tsx
Comment thread apps/mobile/src/features/home/homeThreadList.ts Outdated
Comment thread apps/mobile/src/features/home/homeThreadList.ts Outdated
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Jul 22, 2026
Comment thread apps/web/src/components/settings/SettingsPanels.logic.ts Outdated
Comment thread apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx Outdated
Comment thread apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx Outdated
Comment thread apps/mobile/src/App.tsx Outdated
@juliusmarminge
juliusmarminge force-pushed the agent/group-sidebar-v2-projects branch from 7f2ba9f to 1ff96af Compare July 22, 2026 22:10
Comment thread apps/mobile/src/features/home/HomeScreen.tsx Outdated
Comment thread apps/mobile/src/features/home/HomeScreen.tsx Outdated
Comment thread apps/web/src/components/CommandPalette.tsx Outdated
Comment thread apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx Outdated
Comment thread apps/mobile/src/features/home/homeThreadList.ts Outdated
Comment thread apps/mobile/src/features/home/HomeScreen.tsx Outdated
@juliusmarminge
juliusmarminge force-pushed the agent/group-sidebar-v2-projects branch from 1ff96af to d64eeae Compare July 22, 2026 22:19
@juliusmarminge juliusmarminge changed the title Restore project grouping in Sidebar V2 Restore grouped project filtering in Sidebar V2 Jul 22, 2026
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:XXL 1,000+ changed lines (additions + deletions). labels Jul 22, 2026
Comment thread apps/web/src/components/SidebarV2.tsx
juliusmarminge and others added 3 commits July 23, 2026 14:20
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge
juliusmarminge force-pushed the agent/group-sidebar-v2-projects branch from c0f0ff2 to 2e484a2 Compare July 23, 2026 12:23
Comment thread apps/web/src/components/SidebarV2.tsx
Comment thread apps/web/src/components/SidebarV2.tsx
Comment thread apps/web/src/components/SidebarV2.tsx
Co-authored-by: codex <codex@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ebb4fa0. Configure here.

Comment thread apps/web/src/components/SidebarV2.tsx
Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge
juliusmarminge merged commit 3afb4a9 into pingdotgg:main Jul 23, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants